home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / GIFLIB12.ARJ / GIF2BGI.DOC < prev    next >
Text File  |  1991-05-13  |  3KB  |  88 lines

  1.             Gif2BGI
  2.             --------
  3.  
  4. Program to display images saved as GIF files on IBM PC display devices using
  5. the BGI (Borland) driver interface.
  6.  
  7.   The program has few stages as follows:
  8. 1. Reads GIF file header and determines size of it.
  9. 2. Dynamically allocate enough memory to hold all the image internally.
  10.    One byte per pixel is always allocated, so a little bit more than
  11.    width*height (of screen, not image) bytes are required.
  12. 3. Reads all the image in. Interlaced images are read correctly in, although
  13.    they are displayed sequentially.
  14. 4. Display first image using the defaults as set by the command line option.
  15. 5. Goes to interactive mode. For full description of the interactive mode
  16.    see below
  17.  
  18.  
  19. Usage:
  20. ------
  21.  
  22. Gif2BGI [-q] [-d BGI Directory] [-u UserBGIDrv.Mode] [-z ZoomFactor] [-b]
  23.                                 [-h] GifFile
  24.  
  25. If no GifFile is given, Gif2BGI will try to read stdin for GIF file.
  26.  
  27.  
  28. Memory required:
  29. ----------------
  30.  
  31. Screen.
  32.  
  33.  
  34. Options:
  35. --------
  36.  
  37. 1. [-q] : quite mode. Default off on MSDOS, on on unix. Controls printout
  38.    of running scan lines. Use -q- to turn off.
  39. 2. [-d BGI Directory] : Where should we look for default drivers (as supplied
  40.    by Borland). For example '-d c:/tc/bgi'.
  41. 3. [-u UserBGIDrv.Mode] : Specifies user defined BGI driver. If for example
  42.    you have a BGI driver for your special vga called MYVGA.BGI and you want
  43.    to run it in mode 2 then type '-u c:/tc/bgi/myvga.2'. Note the absolute
  44.    path to the driver must be specified. Also note that we use '/' and not
  45.    '\' so they would not be treated as options.
  46. 4. [-z ZoomFactor] : Sets zoom factor of the image. Zoom factor should be
  47.    power of 2 up to 256. Default is 1 (no zoom).
  48. 5. [-h] : print one command line help, similar to Usage above.
  49.  
  50. Interactive mode:
  51. -----------------
  52.  
  53.   Once the image is displayed, the program goes into interactive mode
  54. which recognizes the following commands:
  55. 1. C - get Color and Position.
  56.      In this sub menu, a cursor appears, and the Color of the pixel the cursor
  57.    is on, with its position in GIF file screen are printed. The 4 arrows may
  58.    be used (shifted for faster movement) to move the cursor. Any other key will
  59.    abort this sub mode.
  60. 2. D - Zoom Down by factor of 2 unless current zoom factor is 1.
  61. 3. R - Redraw the image.
  62. 4. S - print Status of image and program.
  63. 5. U - Zoom Up by factor of 2 unless current zoom factor is 256.
  64. 6. 4 arrow keys can be used to pan to the desire direction, if the image
  65.    overflow to that direction. If, on the other hand, the image fit into the
  66.    Hercules device, arrow keys are ignored. The panning steps are 1/2 screen if
  67.    not on image end.
  68. 7. ' ' - Space bar may be used to abort current image drawing.
  69. 8. ESC - Escape key may be used to abort the program.
  70.  
  71.  
  72. Notes:
  73. ------
  74.  
  75.   As no color quantization is used in this program if a GIF image has more
  76. colors than the BGI driver support, this program will abort.
  77.   This driver is optimized for drivers with one byte per pixel (256 colors)
  78. and will run MUCH faster in these cases.
  79.  
  80.  
  81. Bugs:
  82. -----
  83.  
  84.   For some reason I could not figure out on my ATI wonder card, int 10h call
  85. 10h (AH = AL = 10h) to set the color registers sometimes result with wrong
  86. colors. Direct access of the card registers gives correct results. I dont do
  87. that to make this program portable but if your driver gives wrong colors it
  88. is probably because it is using this bios call. Any one has anything to add?